package com.webank.openledger.contracts;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.fisco.bcos.sdk.abi.FunctionEncoder;
import org.fisco.bcos.sdk.abi.FunctionReturnDecoder;
import org.fisco.bcos.sdk.abi.TypeReference;
import org.fisco.bcos.sdk.abi.datatypes.Address;
import org.fisco.bcos.sdk.abi.datatypes.DynamicArray;
import org.fisco.bcos.sdk.abi.datatypes.Event;
import org.fisco.bcos.sdk.abi.datatypes.Function;
import org.fisco.bcos.sdk.abi.datatypes.Type;
import org.fisco.bcos.sdk.abi.datatypes.Utf8String;
import org.fisco.bcos.sdk.abi.datatypes.generated.Bytes32;
import org.fisco.bcos.sdk.abi.datatypes.generated.StaticArray4;
import org.fisco.bcos.sdk.abi.datatypes.generated.Uint256;
import org.fisco.bcos.sdk.abi.datatypes.generated.Uint8;
import org.fisco.bcos.sdk.abi.datatypes.generated.tuples.generated.Tuple1;
import org.fisco.bcos.sdk.abi.datatypes.generated.tuples.generated.Tuple2;
import org.fisco.bcos.sdk.abi.datatypes.generated.tuples.generated.Tuple3;
import org.fisco.bcos.sdk.abi.datatypes.generated.tuples.generated.Tuple4;
import org.fisco.bcos.sdk.client.Client;
import org.fisco.bcos.sdk.contract.Contract;
import org.fisco.bcos.sdk.crypto.CryptoSuite;
import org.fisco.bcos.sdk.crypto.keypair.CryptoKeyPair;
import org.fisco.bcos.sdk.eventsub.EventCallback;
import org.fisco.bcos.sdk.model.CryptoType;
import org.fisco.bcos.sdk.model.TransactionReceipt;
import org.fisco.bcos.sdk.model.callback.TransactionCallback;
import org.fisco.bcos.sdk.transaction.model.exception.ContractException;

@SuppressWarnings("unchecked")
public class AssetPool extends Contract {
    public static final String[] BINARY_ARRAY = {"60806040526001600560006101000a81548160ff021916908360ff1602179055503480156200002d57600080fd5b506040516040806200323c83398101806040526200004f919081019062000363565b6200005962000279565b81600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606060405190810160405280600060ff1681526020016040805190810160405280600481526020017f696e69740000000000000000000000000000000000000000000000000000000081525081526020016040805190810160405280600481526020017f696e69740000000000000000000000000000000000000000000000000000000081525081525090506001819080600181540180825580915050906001820390600052602060002090600302016000909192909190915060008201518160000160006101000a81548160ff021916908360ff1602179055506020820151816001019080519060200190620001939291906200029e565b506040820151816002019080519060200190620001b29291906200029e565b5050505080600360008060ff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160010190805190602001906200020c9291906200029e565b5060408201518160020190805190602001906200022b9291906200029e565b5090505082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050620003c4565b606060405190810160405280600060ff16815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002e157805160ff191683800117855562000312565b8280016001018555821562000312579182015b8281111562000311578251825591602001919060010190620002f4565b5b50905062000321919062000325565b5090565b6200034a91905b80821115620003465760008160009055506001016200032c565b5090565b90565b60006200035b8251620003a4565b905092915050565b600080604083850312156200037757600080fd5b600062000387858286016200034d565b92505060206200039a858286016200034d565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b612e6880620003d46000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631b6cb1e014610093578063200d2ed2146100d05780636a9f86ac146100fb5780636c85820c1461013857806387e1a05c14610175578063e17bfd67146101b2578063f03d782d146101ef578063f40b5cbb1461022c575b600080fd5b34801561009f57600080fd5b506100ba60048036036100b59190810190612029565b610269565b6040516100c79190612a20565b60405180910390f35b3480156100dc57600080fd5b506100e561043a565b6040516100f29190612c5d565b60405180910390f35b34801561010757600080fd5b50610122600480360361011d9190810190611f62565b61044d565b60405161012f9190612a20565b60405180910390f35b34801561014457600080fd5b5061015f600480360361015a9190810190612029565b610860565b60405161016c9190612c5d565b60405180910390f35b34801561018157600080fd5b5061019c60048036036101979190810190611f62565b610a31565b6040516101a99190612a20565b60405180910390f35b3480156101be57600080fd5b506101d960048036036101d49190810190612029565b610e26565b6040516101e69190612c5d565b60405180910390f35b3480156101fb57600080fd5b5061021660048036036102119190810190611fda565b610ff7565b6040516102239190612c5d565b60405180910390f35b34801561023857600080fd5b50610253600480360361024e9190810190612052565b6114ae565b6040516102609190612c42565b60405180910390f35b606080600080600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c04d4ef3600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff163086896040518563ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161030e9493929190612749565b6040805180830381600087803b15801561032757600080fd5b505af115801561033b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061035f9190810190611f9e565b80925081935050508015156103a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a090612a62565b60405180910390fd5b600280548060200260200160405190810160405280929190818152602001828054801561042b57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116103e1575b50505050509350505050919050565b600560009054906101000a900460ff1681565b606080600080610466868461186190919063ffffffff16565b9250600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c04d4ef3600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff163086896040518563ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161050794939291906127a9565b6040805180830381600087803b15801561052057600080fd5b505af1158015610534573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105589190810190611f9e565b80925081935050508015156105a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059990612ac2565b60405180910390fd5b600160ff16600560009054906101000a900460ff1660ff161415156105fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f390612c02565b60405180910390fd5b6106058661187d565b151515610647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063e90612ae2565b60405180910390fd5b60028690806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600360008060ff1681526020019081526020016000206000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820160009054906101000a900460ff168160000160006101000a81548160ff021916908360ff16021790555060018201816001019080546001816001161561010002031660029004610756929190611cb5565b506002820181600201908054600181600116156101000203166002900461077e929190611cb5565b50905050600160028054905003600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600280548060200260200160405190810160405280929190818152602001828054801561085057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610806575b5050505050935050505092915050565b60006060600080600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c04d4ef3600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff163086896040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016109069493929190612869565b6040805180830381600087803b15801561091f57600080fd5b505af1158015610933573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109579190810190611f9e565b80925081935050508015156109a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099890612b82565b60405180910390fd5b600260ff16600560009054906101000a900460ff1660ff161415156109fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f290612bc2565b60405180910390fd5b6001600560006101000a81548160ff021916908360ff160217905550600560009054906101000a900460ff169350505050919050565b606080600080600080610a438861187d565b1515610a84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7b90612b42565b60405180910390fd5b610a97888661186190919063ffffffff16565b9450600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c04d4ef3600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630888b6040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610b3894939291906128c9565b6040805180830381600087803b158015610b5157600080fd5b505af1158015610b65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610b899190810190611f9e565b8094508195505050821515610bd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bca90612be2565b60405180910390fd5b600160ff16600560009054906101000a900460ff1660ff16141515610c2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2490612c02565b60405180910390","fd5b600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054915060028054905082101515610c8257610e1b565b8190505b600160028054905003811015610d3757600260018201815481101515610ca857fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600282815481101515610ce257fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080600101915050610c86565b6002600160028054905003815481101515610d4e57fe5b9060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002805480919060019003610d909190611d3c565b506002805480602002602001604051908101604052809291908181526020018280548015610e1357602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610dc9575b505050505095505b505050505092915050565b60006060600080600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c04d4ef3600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff163086896040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610ecc9493929190612989565b6040805180830381600087803b158015610ee557600080fd5b505af1158015610ef9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f1d9190810190611f9e565b8092508193505050801515610f67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5e90612b22565b60405180910390fd5b600160ff16600560009054906101000a900460ff1660ff16141515610fc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb890612c02565b60405180910390fd5b6002600560006101000a81548160ff021916908360ff160217905550600560009054906101000a900460ff169350505050919050565b6000606060008060008660ff169050611019888561186190919063ffffffff16565b935061102e818561192090919063ffffffff16565b9350600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c04d4ef3600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630878a6040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016110cf9493929190612809565b6040805180830381600087803b1580156110e857600080fd5b505af11580156110fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506111209190810190611f9e565b809350819450505081151561116a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116190612a42565b60405180910390fd5b600160ff16600560009054906101000a900460ff1660ff161415156111c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111bb90612c02565b60405180910390fd5b6111cd8861187d565b151561120e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120590612a82565b60405180910390fd5b6112178761193c565b1515611258576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124f90612c22565b60405180910390fd5b8660ff166000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1660ff16141515156112f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e890612ba2565b60405180910390fd5b7f93f27415d37326acf502083f0633852015a2113d0f9e29eac36cf784a4a3e401886000808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1689604051611372939291906129e9565b60405180910390a1600360008860ff1660ff1681526020019081526020016000206000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820160009054906101000a900460ff168160000160006101000a81548160ff021916908360ff16021790555060018201816001019080546001816001161561010002031660029004611426929190611cb5565b506002820181600201908054600181600116156101000203166002900461144e929190611cb5565b509050506000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff169450505050509392505050565b6000606060008060006114bf611d68565b600089511180156114d1575060408951105b1515611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150990612aa2565b60405180910390fd5b8960ff16915061152b828661192090919063ffffffff16565b945061154089866119ad90919063ffffffff16565b945061155588866119ad90919063ffffffff16565b9450600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c04d4ef3600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630888b6040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016115f69493929190612929565b6040805180830381600087803b15801561160f57600080fd5b505af1158015611623573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116479190810190611f9e565b8094508195505050821515611691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168890612b62565b60405180910390fd5b600160ff168a60ff161415156116dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d390612c02565b60405180910390fd5b6116e58a61193c565b151515611727576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171e90612b02565b60405180910390fd5b6060604051908101604052808b60ff1681526020018a81526020018981525090506001819080600181540180825580915050906001820390600052602060002090600302016000909192909190915060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160010190805190602001906117b3929190611d8d565b5060408201518160020190805190602001906117d0929190611d8d565b5050505080600360008c60ff1660ff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff160217905550602082015181600101908051906020019061182b929190611d8d565b506040820151816002019080519060200190611848929190611d8d565b5090505060018054905095505050505050949350505050565b606061187583611870846119c1565b611aa0565b905092915050565b600080600090505b600280549050811015611915578273ffffffffffffffffffffffffffffffffffffffff166002828154811015156118b857fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611908576001915061191a565b8080600101915050611885565b600091505b50919050565b60606119348361192f84611c71565b611aa0565b905092915050565b600080600090505b6001805490508110156119a2578260ff1660018281548110151561196457fe5b906000526020600020906003020160000160009054906101000a900460ff1660ff16141561199557600191506119a7565b8080600101915050611944565b600091505b50919050565b60606119b98383611aa0565b905092915050565b6060600080836c0100000000000000000000000002915060146040519080825280601f01601f191660200182016040528015611a0c5781602001602082028038833980820191505090505b509250600090505b6014811015611a99578181601481101515611a2b57fe5b1a7f0100000000000000000000000000000000000000000000000000000000000000028382815181101515611a5c57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050611a14565b5050919050565b606080606080606060008088955087945084518651016040519080825280601f01601f191660200182016040528015611ae85781602001602082028038833980820191505090505b50935083925060009150600090505b8551811015611baa578581815181101515611b0e57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000028383806001019450815181101515611b6d57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050611af7565b600090505b8451811015611c62578481815181101515611bc657fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000028383806001019450815181101515611c2557fe5b906020010190","7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050611baf565b83965050505050505092915050565b606060206040519080825280601f01601f191660200182016040528015611ca75781602001602082028038833980820191505090505b509050816020820152919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611cee5780548555611d2b565b82800160010185558215611d2b57600052602060002091601f016020900482015b82811115611d2a578254825591600101919060010190611d0f565b5b509050611d389190611e0d565b5090565b815481835581811115611d6357818360005260206000209182019101611d629190611e0d565b5b505050565b606060405190810160405280600060ff16815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611dce57805160ff1916838001178555611dfc565b82800160010185558215611dfc579182015b82811115611dfb578251825591602001919060010190611de0565b5b509050611e099190611e0d565b5090565b611e2f91905b80821115611e2b576000816000905550600101611e13565b5090565b90565b6000611e3e8235612d86565b905092915050565b6000611e528251612d86565b905092915050565b600082601f8301121515611e6d57600080fd5b6004611e80611e7b82612ca5565b612c78565b91508183856020840282011115611e9657600080fd5b60005b83811015611ec65781611eac8882611ee4565b845260208401935060208301925050600181019050611e99565b5050505092915050565b6000611edc8251612da6565b905092915050565b6000611ef08235612db2565b905092915050565b600082601f8301121515611f0b57600080fd5b8135611f1e611f1982612cc7565b612c78565b91508082526020830160208301858383011115611f3a57600080fd5b611f45838284612ddb565b50505092915050565b6000611f5a8235612dbc565b905092915050565b60008060a08385031215611f7557600080fd5b6000611f8385828601611e32565b9250506020611f9485828601611e5a565b9150509250929050565b60008060408385031215611fb157600080fd5b6000611fbf85828601611e46565b9250506020611fd085828601611ed0565b9150509250929050565b600080600060c08486031215611fef57600080fd5b6000611ffd86828701611e32565b935050602061200e86828701611f4e565b925050604061201f86828701611e5a565b9150509250925092565b60006080828403121561203b57600080fd5b600061204984828501611e5a565b91505092915050565b60008060008060e0858703121561206857600080fd5b600061207687828801611f4e565b945050602085013567ffffffffffffffff81111561209357600080fd5b61209f87828801611ef8565b935050604085013567ffffffffffffffff8111156120bc57600080fd5b6120c887828801611ef8565b92505060606120d987828801611e5a565b91505092959194509250565b6120ee81612d45565b82525050565b60006120ff82612d0a565b80845260208401935061211183612cf3565b60005b82811015612143576121278683516120e5565b61213082612d2b565b9150602086019550600181019050612114565b50849250505092915050565b61215881612d15565b61216182612d00565b60005b828110156121935761217785835161219a565b61218082612d38565b9150602085019450600181019050612164565b5050505050565b6121a381612d65565b82525050565b60006121b482612d20565b8084526121c8816020860160208601612dea565b6121d181612e1d565b602085010191505092915050565b6121e881612dc9565b82525050565b6000601382527f466f7262696464656e206d6f76654173736574000000000000000000000000006020830152604082019050919050565b6000600c82527f67657441737365744c69737400000000000000000000000000000000000000006020830152604082019050919050565b6000601682527f466f7262696464656e2067657441737365744c697374000000000000000000006020830152604082019050919050565b6000601882527f417373657420686173206e6f74206265656e20616464656400000000000000006020830152604082019050919050565b6000602882527f6e616d652073686f756c64206e6f74206265206e756c6c20616e64206c65737360208301527f207468616e2036340000000000000000000000000000000000000000000000006040830152606082019050919050565b6000601282527f466f7262696464656e20616464417373657400000000000000000000000000006020830152604082019050919050565b6000601482527f417373657420686173206265656e2061646465640000000000000000000000006020830152604082019050919050565b6000600882527f61646441737365740000000000000000000000000000000000000000000000006020830152604082019050919050565b6000601582527f53746174757320686173206265656e20616464656400000000000000000000006020830152604082019050919050565b6000600982527f6d6f7665417373657400000000000000000000000000000000000000000000006020830152604082019050919050565b6000600c82527f756e667265657a65506f6f6c00000000000000000000000000000000000000006020830152604082019050919050565b6000600b82527f72656d6f766541737365740000000000000000000000000000000000000000006020830152604082019050919050565b6000600982527f61646453746174757300000000000000000000000000000000000000000000006020830152604082019050919050565b6000601482527f466f7262696464656e20667265657a65506f6f6c0000000000000000000000006020830152604082019050919050565b6000601982527f417373657420686173206e6f7420206265656e206164646564000000000000006020830152604082019050919050565b6000601382527f466f7262696464656e20616464537461747573000000000000000000000000006020830152604082019050919050565b6000601682527f466f7262696464656e20756e667265657a65506f6f6c000000000000000000006020830152604082019050919050565b6000602182527f5374617475732068617320206265656e2073657420746f20746865206173736560208301527f74000000000000000000000000000000000000000000000000000000000000006040830152606082019050919050565b6000600a82527f667265657a65506f6f6c000000000000000000000000000000000000000000006020830152604082019050919050565b6000601882527f43757272656e7420537461747573206973204e4f524d414c00000000000000006020830152604082019050919050565b6000601582527f466f7262696464656e2072656d6f7665417373657400000000000000000000006020830152604082019050919050565b6000601882527f43757272656e742053746174757320697320464f525a454e00000000000000006020830152604082019050919050565b6000601982527f53746174757320686173206e6f74206265656e206164646564000000000000006020830152604082019050919050565b61273481612d6f565b82525050565b61274381612d79565b82525050565b60006101008201905061275f60008301876120e5565b61276c60208301866121df565b818103604083015261277d81612225565b9050818103606083015261279181856121a9565b90506127a0608083018461214f565b95945050505050565b6000610100820190506127bf60008301876120e5565b6127cc60208301866121df565b81810360408301526127dd81612395565b905081810360608301526127f181856121a9565b9050612800608083018461214f565b95945050505050565b60006101008201905061281f60008301876120e5565b61282c60208301866121df565b818103604083015261283d81612403565b9050818103606083015261285181856121a9565b9050612860608083018461214f565b95945050505050565b60006101008201905061287f60008301876120e5565b61288c60208301866121df565b818103604083015261289d8161243a565b905081810360608301526128b181856121a9565b90506128c0608083018461214f565b95945050505050565b6000610100820190506128df60008301876120e5565b6128ec60208301866121df565b81810360408301526128fd81612471565b9050818103606083015261291181856121a9565b9050612920608083018461214f565b95945050505050565b60006101008201905061293f60008301876120e5565b61294c60208301866121df565b818103604083015261295d816124a8565b9050818103606083015261297181856121a9565b9050612980608083018461214f565b95945050505050565b60006101008201905061299f60008301876120e5565b6129ac60208301866121df565b81810360408301526129bd81612618565b905081810360608301526129d181856121a9565b90506129e0608083018461214f565b95945050505050565b60006060820190506129fe60008301866120e5565b612a0b602083018561273a565b612a18604083018461273a565b949350505050565b60006020820190508181036000830152612a3a81846120f4565b905092915050565b60006020820190508181036000830152612a5b816121ee565b9050919050565b60006020820190508181036000830152612a7b8161225c565b9050919050565b60006020820190508181036000830152612a9b81612293565b9050919050565b60006020820190508181036000830152612abb816122ca565b9050919050565b60006020820190508181036000830152612adb81612327565b9050919050565b60006020820190508181036000830152612afb8161235e565b9050919050565b60006020820190508181036000830152612b1b816123cc565b9050919050565b60006020820190508181036000830152612b3b816124df565b9050919050565b60006020820190508181036000830152612b5b81612516565b9050919050565b60006020820190508181036000830152612b7b8161254d565b9050919050565b60006020820190508181036000830152612b9b81612584565b9050919050565b60006020820190508181036000830152612bbb816125bb565b9050919050565b60006020820190508181036000830152612bdb8161264f565b9050919050565b60006020820190508181036000830152612bfb81612686565b9050919050565b60006020820190508181036000830152612c1b816126bd565b9050919050565b600060208201905081","81036000830152612c3b816126f4565b9050919050565b6000602082019050612c57600083018461272b565b92915050565b6000602082019050612c72600083018461273a565b92915050565b6000604051905081810181811067ffffffffffffffff82111715612c9b57600080fd5b8060405250919050565b600067ffffffffffffffff821115612cbc57600080fd5b602082029050919050565b600067ffffffffffffffff821115612cde57600080fd5b601f19601f8301169050602081019050919050565b6000602082019050919050565b6000819050919050565b600081519050919050565b600060049050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000819050919050565b600060ff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60008115159050919050565b6000819050919050565b600060ff82169050919050565b6000612dd482612d45565b9050919050565b82818337600083830152505050565b60005b83811015612e08578082015181840152602081019050612ded565b83811115612e17576000848401525b50505050565b6000601f19601f83011690509190505600a265627a7a72305820d30cd31951cf223c807d66d030c6f917f2ab98f98d316b809629c1af1ec87e6d6c6578706572696d656e74616cf50037"};

    public static final String BINARY = String.join("", BINARY_ARRAY);

    public static final String[] SM_BINARY_ARRAY = {"60806040526001600560006101000a81548160ff021916908360ff1602179055503480156200002d57600080fd5b506040516040806200323b83398101806040526200004f919081019062000363565b6200005962000279565b81600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606060405190810160405280600060ff1681526020016040805190810160405280600481526020017f696e69740000000000000000000000000000000000000000000000000000000081525081526020016040805190810160405280600481526020017f696e69740000000000000000000000000000000000000000000000000000000081525081525090506001819080600181540180825580915050906001820390600052602060002090600302016000909192909190915060008201518160000160006101000a81548160ff021916908360ff1602179055506020820151816001019080519060200190620001939291906200029e565b506040820151816002019080519060200190620001b29291906200029e565b5050505080600360008060ff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160010190805190602001906200020c9291906200029e565b5060408201518160020190805190602001906200022b9291906200029e565b5090505082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050620003c4565b606060405190810160405280600060ff16815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002e157805160ff191683800117855562000312565b8280016001018555821562000312579182015b8281111562000311578251825591602001919060010190620002f4565b5b50905062000321919062000325565b5090565b6200034a91905b80821115620003465760008160009055506001016200032c565b5090565b90565b60006200035b8251620003a4565b905092915050565b600080604083850312156200037757600080fd5b600062000387858286016200034d565b92505060206200039a858286016200034d565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b612e6780620003d46000396000f30060806040526004361061008d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680622f9271146100925780630b253a92146100cf578063244e58411461010c57806334229a821461013757806339bd510e14610174578063706d9a40146101b1578063bbd02c57146101ee578063bd7c68bd1461022b575b600080fd5b34801561009e57600080fd5b506100b960048036036100b49190810190612028565b610268565b6040516100c69190612a1f565b60405180910390f35b3480156100db57600080fd5b506100f660048036036100f19190810190611fd9565b610439565b6040516101039190612c5c565b60405180910390f35b34801561011857600080fd5b506101216108f0565b60405161012e9190612c5c565b60405180910390f35b34801561014357600080fd5b5061015e60048036036101599190810190612028565b610903565b60405161016b9190612c5c565b60405180910390f35b34801561018057600080fd5b5061019b60048036036101969190810190611f61565b610ad4565b6040516101a89190612a1f565b60405180910390f35b3480156101bd57600080fd5b506101d860048036036101d39190810190612028565b610ee7565b6040516101e59190612c5c565b60405180910390f35b3480156101fa57600080fd5b5061021560048036036102109190810190611f61565b6110b8565b6040516102229190612a1f565b60405180910390f35b34801561023757600080fd5b50610252600480360361024d9190810190612051565b6114ad565b60405161025f9190612c41565b60405180910390f35b606080600080600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfe3b125600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff163086896040518563ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161030d9493929190612808565b6040805180830381600087803b15801561032657600080fd5b505af115801561033a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061035e9190810190611f9d565b80925081935050508015156103a8576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161039f90612b41565b60405180910390fd5b600280548060200260200160405190810160405280929190818152602001828054801561042a57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116103e0575b50505050509350505050919050565b6000606060008060008660ff16905061045b888561186090919063ffffffff16565b9350610470818561187c90919063ffffffff16565b9350600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfe3b125600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630878a6040518563ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161051194939291906127a8565b6040805180830381600087803b15801561052a57600080fd5b505af115801561053e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506105629190810190611f9d565b80935081945050508115156105ac576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004016105a390612a61565b60405180910390fd5b600160ff16600560009054906101000a900460ff1660ff16141515610606576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004016105fd90612a81565b60405180910390fd5b61060f88611898565b1515610650576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161064790612a41565b60405180910390fd5b6106598761193b565b151561069a576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161069190612b01565b60405180910390fd5b8660ff166000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1660ff1614151515610733576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161072a90612be1565b60405180910390fd5b7f5706836dd6ff03b1f38e7cbdc504dca0975fab89c290fdb43637b5418e3282a7886000808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16896040516107b4939291906129e8565b60405180910390a1600360008860ff1660ff1681526020019081526020016000206000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820160009054906101000a900460ff168160000160006101000a81548160ff021916908360ff16021790555060018201816001019080546001816001161561010002031660029004610868929190611cb4565b5060028201816002019080546001816001161561010002031660029004610890929190611cb4565b509050506000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff169450505050509392505050565b600560009054906101000a900460ff1681565b60006060600080600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfe3b125600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff163086896040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016109a99493929190612868565b6040805180830381600087803b1580156109c257600080fd5b505af11580156109d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109fa9190810190611f9d565b8092508193505050801515610a44576040517fc703cb12000000000000000000000000000000000000000000000000000000008152600401610a3b90612c01565b60405180910390fd5b600160ff16600560009054906101000a900460ff1660ff16141515610a9e576040517fc703cb12000000000000000000000000000000000000000000000000000000008152600401610a9590612a81565b60405180910390fd5b6002600560006101000a81548160ff021916908360ff160217905550600560009054906101000a900460ff169350505050919050565b606080600080610aed868461186090919063ffffffff16565b9250600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfe3b125600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff163086896040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610b8e9493929190612748565b6040805180830381600087803b158015610ba757600080fd5b505af1158015610bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610bdf9190810190611f9d565b8092508193505050801515610c29576040517fc703cb12000000000000000000000000000000000000000000000000000000008152600401610c2090612bc1565b60405180910390fd5b6001","60ff16600560009054906101000a900460ff1660ff16141515610c83576040517fc703cb12000000000000000000000000000000000000000000000000000000008152600401610c7a90612a81565b60405180910390fd5b610c8c86611898565b151515610cce576040517fc703cb12000000000000000000000000000000000000000000000000000000008152600401610cc590612ae1565b60405180910390fd5b60028690806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600360008060ff1681526020019081526020016000206000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820160009054906101000a900460ff168160000160006101000a81548160ff021916908360ff16021790555060018201816001019080546001816001161561010002031660029004610ddd929190611cb4565b5060028201816002019080546001816001161561010002031660029004610e05929190611cb4565b50905050600160028054905003600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506002805480602002602001604051908101604052809291908181526020018280548015610ed757602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610e8d575b5050505050935050505092915050565b60006060600080600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfe3b125600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff163086896040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401610f8d9493929190612928565b6040805180830381600087803b158015610fa657600080fd5b505af1158015610fba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610fde9190810190611f9d565b8092508193505050801515611028576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161101f90612b21565b60405180910390fd5b600260ff16600560009054906101000a900460ff1660ff16141515611082576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161107990612ba1565b60405180910390fd5b6001600560006101000a81548160ff021916908360ff160217905550600560009054906101000a900460ff169350505050919050565b6060806000806000806110ca88611898565b151561110b576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161110290612b61565b60405180910390fd5b61111e888661186090919063ffffffff16565b9450600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfe3b125600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630888b6040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016111bf9493929190612988565b6040805180830381600087803b1580156111d857600080fd5b505af11580156111ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506112109190810190611f9d565b809450819550505082151561125a576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161125190612aa1565b60405180910390fd5b600160ff16600560009054906101000a900460ff1660ff161415156112b4576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004016112ab90612a81565b60405180910390fd5b600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054915060028054905082101515611309576114a2565b8190505b6001600280549050038110156113be5760026001820181548110151561132f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660028281548110151561136957fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808060010191505061130d565b60026001600280549050038154811015156113d557fe5b9060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560028054809190600190036114179190611d3b565b50600280548060200260200160405190810160405280929190818152602001828054801561149a57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611450575b505050505095505b505050505092915050565b6000606060008060006114be611d67565b600089511180156114d0575060408951105b1515611511576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161150890612b81565b60405180910390fd5b8960ff16915061152a828661187c90919063ffffffff16565b945061153f89866119ac90919063ffffffff16565b945061155488866119ac90919063ffffffff16565b9450600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfe3b125600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630888b6040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016115f594939291906128c8565b6040805180830381600087803b15801561160e57600080fd5b505af1158015611622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506116469190810190611f9d565b8094508195505050821515611690576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161168790612ac1565b60405180910390fd5b600160ff168a60ff161415156116db576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004016116d290612a81565b60405180910390fd5b6116e48a61193b565b151515611726576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040161171d90612c21565b60405180910390fd5b6060604051908101604052808b60ff1681526020018a81526020018981525090506001819080600181540180825580915050906001820390600052602060002090600302016000909192909190915060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160010190805190602001906117b2929190611d8c565b5060408201518160020190805190602001906117cf929190611d8c565b5050505080600360008c60ff1660ff16815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff160217905550602082015181600101908051906020019061182a929190611d8c565b506040820151816002019080519060200190611847929190611d8c565b5090505060018054905095505050505050949350505050565b60606118748361186f846119c0565b611a9f565b905092915050565b60606118908361188b84611c70565b611a9f565b905092915050565b600080600090505b600280549050811015611930578273ffffffffffffffffffffffffffffffffffffffff166002828154811015156118d357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156119235760019150611935565b80806001019150506118a0565b600091505b50919050565b600080600090505b6001805490508110156119a1578260ff1660018281548110151561196357fe5b906000526020600020906003020160000160009054906101000a900460ff1660ff16141561199457600191506119a6565b8080600101915050611943565b600091505b50919050565b60606119b88383611a9f565b905092915050565b6060600080836c0100000000000000000000000002915060146040519080825280601f01601f191660200182016040528015611a0b5781602001602082028038833980820191505090505b509250600090505b6014811015611a98578181601481101515611a2a57fe5b1a7f0100000000000000000000000000000000000000000000000000000000000000028382815181101515611a5b57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050611a13565b5050919050565b606080606080606060008088955087945084518651016040519080825280601f01601f191660200182016040528015611ae75781602001602082028038833980820191505090505b50935083925060009150600090505b8551811015611ba9578581815181101515611b0d57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000028383806001019450815181101515611b6c57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050611af6565b600090505b8451811015611c61578481815181101515611bc557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000028383806001019450815181101515611c2457fe5b9060200101907e","ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050611bae565b83965050505050505092915050565b606060206040519080825280601f01601f191660200182016040528015611ca65781602001602082028038833980820191505090505b509050816020820152919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611ced5780548555611d2a565b82800160010185558215611d2a57600052602060002091601f016020900482015b82811115611d29578254825591600101919060010190611d0e565b5b509050611d379190611e0c565b5090565b815481835581811115611d6257818360005260206000209182019101611d619190611e0c565b5b505050565b606060405190810160405280600060ff16815260200160608152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611dcd57805160ff1916838001178555611dfb565b82800160010185558215611dfb579182015b82811115611dfa578251825591602001919060010190611ddf565b5b509050611e089190611e0c565b5090565b611e2e91905b80821115611e2a576000816000905550600101611e12565b5090565b90565b6000611e3d8235612d85565b905092915050565b6000611e518251612d85565b905092915050565b600082601f8301121515611e6c57600080fd5b6004611e7f611e7a82612ca4565b612c77565b91508183856020840282011115611e9557600080fd5b60005b83811015611ec55781611eab8882611ee3565b845260208401935060208301925050600181019050611e98565b5050505092915050565b6000611edb8251612da5565b905092915050565b6000611eef8235612db1565b905092915050565b600082601f8301121515611f0a57600080fd5b8135611f1d611f1882612cc6565b612c77565b91508082526020830160208301858383011115611f3957600080fd5b611f44838284612dda565b50505092915050565b6000611f598235612dbb565b905092915050565b60008060a08385031215611f7457600080fd5b6000611f8285828601611e31565b9250506020611f9385828601611e59565b9150509250929050565b60008060408385031215611fb057600080fd5b6000611fbe85828601611e45565b9250506020611fcf85828601611ecf565b9150509250929050565b600080600060c08486031215611fee57600080fd5b6000611ffc86828701611e31565b935050602061200d86828701611f4d565b925050604061201e86828701611e59565b9150509250925092565b60006080828403121561203a57600080fd5b600061204884828501611e59565b91505092915050565b60008060008060e0858703121561206757600080fd5b600061207587828801611f4d565b945050602085013567ffffffffffffffff81111561209257600080fd5b61209e87828801611ef7565b935050604085013567ffffffffffffffff8111156120bb57600080fd5b6120c787828801611ef7565b92505060606120d887828801611e59565b91505092959194509250565b6120ed81612d44565b82525050565b60006120fe82612d09565b80845260208401935061211083612cf2565b60005b82811015612142576121268683516120e4565b61212f82612d2a565b9150602086019550600181019050612113565b50849250505092915050565b61215781612d14565b61216082612cff565b60005b8281101561219257612176858351612199565b61217f82612d37565b9150602085019450600181019050612163565b5050505050565b6121a281612d64565b82525050565b60006121b382612d1f565b8084526121c7816020860160208601612de9565b6121d081612e1c565b602085010191505092915050565b6121e781612dc8565b82525050565b6000601882527f417373657420686173206e6f74206265656e20616464656400000000000000006020830152604082019050919050565b6000600882527f61646441737365740000000000000000000000000000000000000000000000006020830152604082019050919050565b6000600982527f6d6f7665417373657400000000000000000000000000000000000000000000006020830152604082019050919050565b6000600c82527f67657441737365744c69737400000000000000000000000000000000000000006020830152604082019050919050565b6000601382527f466f7262696464656e206d6f76654173736574000000000000000000000000006020830152604082019050919050565b6000600a82527f667265657a65506f6f6c000000000000000000000000000000000000000000006020830152604082019050919050565b6000601882527f43757272656e742053746174757320697320464f525a454e00000000000000006020830152604082019050919050565b6000601582527f466f7262696464656e2072656d6f7665417373657400000000000000000000006020830152604082019050919050565b6000601382527f466f7262696464656e20616464537461747573000000000000000000000000006020830152604082019050919050565b6000600982527f61646453746174757300000000000000000000000000000000000000000000006020830152604082019050919050565b6000601482527f417373657420686173206265656e2061646465640000000000000000000000006020830152604082019050919050565b6000601982527f53746174757320686173206e6f74206265656e206164646564000000000000006020830152604082019050919050565b6000600c82527f756e667265657a65506f6f6c00000000000000000000000000000000000000006020830152604082019050919050565b6000601682527f466f7262696464656e20756e667265657a65506f6f6c000000000000000000006020830152604082019050919050565b6000601682527f466f7262696464656e2067657441737365744c697374000000000000000000006020830152604082019050919050565b6000601982527f417373657420686173206e6f7420206265656e206164646564000000000000006020830152604082019050919050565b6000602882527f6e616d652073686f756c64206e6f74206265206e756c6c20616e64206c65737360208301527f207468616e2036340000000000000000000000000000000000000000000000006040830152606082019050919050565b6000601882527f43757272656e7420537461747573206973204e4f524d414c00000000000000006020830152604082019050919050565b6000601282527f466f7262696464656e20616464417373657400000000000000000000000000006020830152604082019050919050565b6000602182527f5374617475732068617320206265656e2073657420746f20746865206173736560208301527f74000000000000000000000000000000000000000000000000000000000000006040830152606082019050919050565b6000601482527f466f7262696464656e20667265657a65506f6f6c0000000000000000000000006020830152604082019050919050565b6000600b82527f72656d6f766541737365740000000000000000000000000000000000000000006020830152604082019050919050565b6000601582527f53746174757320686173206265656e20616464656400000000000000000000006020830152604082019050919050565b61273381612d6e565b82525050565b61274281612d78565b82525050565b60006101008201905061275e60008301876120e4565b61276b60208301866121de565b818103604083015261277c81612224565b9050818103606083015261279081856121a8565b905061279f608083018461214e565b95945050505050565b6000610100820190506127be60008301876120e4565b6127cb60208301866121de565b81810360408301526127dc8161225b565b905081810360608301526127f081856121a8565b90506127ff608083018461214e565b95945050505050565b60006101008201905061281e60008301876120e4565b61282b60208301866121de565b818103604083015261283c81612292565b9050818103606083015261285081856121a8565b905061285f608083018461214e565b95945050505050565b60006101008201905061287e60008301876120e4565b61288b60208301866121de565b818103604083015261289c81612300565b905081810360608301526128b081856121a8565b90506128bf608083018461214e565b95945050505050565b6000610100820190506128de60008301876120e4565b6128eb60208301866121de565b81810360408301526128fc816123dc565b9050818103606083015261291081856121a8565b905061291f608083018461214e565b95945050505050565b60006101008201905061293e60008301876120e4565b61294b60208301866121de565b818103604083015261295c81612481565b9050818103606083015261297081856121a8565b905061297f608083018461214e565b95945050505050565b60006101008201905061299e60008301876120e4565b6129ab60208301866121de565b81810360408301526129bc816126bc565b905081810360608301526129d081856121a8565b90506129df608083018461214e565b95945050505050565b60006060820190506129fd60008301866120e4565b612a0a6020830185612739565b612a176040830184612739565b949350505050565b60006020820190508181036000830152612a3981846120f3565b905092915050565b60006020820190508181036000830152612a5a816121ed565b9050919050565b60006020820190508181036000830152612a7a816122c9565b9050919050565b60006020820190508181036000830152612a9a81612337565b9050919050565b60006020820190508181036000830152612aba8161236e565b9050919050565b60006020820190508181036000830152612ada816123a5565b9050919050565b60006020820190508181036000830152612afa81612413565b9050919050565b60006020820190508181036000830152612b1a8161244a565b9050919050565b60006020820190508181036000830152612b3a816124b8565b9050919050565b60006020820190508181036000830152612b5a816124ef565b9050919050565b60006020820190508181036000830152612b7a81612526565b9050919050565b60006020820190508181036000830152612b9a8161255d565b9050919050565b60006020820190508181036000830152612bba816125ba565b9050919050565b60006020820190508181036000830152612bda816125f1565b9050919050565b60006020820190508181036000830152612bfa81612628565b9050919050565b60006020820190508181036000830152612c1a81612685565b9050919050565b60006020820190508181","036000830152612c3a816126f3565b9050919050565b6000602082019050612c56600083018461272a565b92915050565b6000602082019050612c716000830184612739565b92915050565b6000604051905081810181811067ffffffffffffffff82111715612c9a57600080fd5b8060405250919050565b600067ffffffffffffffff821115612cbb57600080fd5b602082029050919050565b600067ffffffffffffffff821115612cdd57600080fd5b601f19601f8301169050602081019050919050565b6000602082019050919050565b6000819050919050565b600081519050919050565b600060049050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000819050919050565b600060ff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60008115159050919050565b6000819050919050565b600060ff82169050919050565b6000612dd382612d44565b9050919050565b82818337600083830152505050565b60005b83811015612e07578082015181840152602081019050612dec565b83811115612e16576000848401525b50505050565b6000601f19601f83011690509190505600a265627a7a723058201fc2051ea980b9fc5a408f1079ab10136409586fff03502410ab9dd39d88a7456c6578706572696d656e74616cf50037"};

    public static final String SM_BINARY = String.join("", SM_BINARY_ARRAY);

    public static final String[] ABI_ARRAY = {"[{\"constant\":true,\"inputs\":[{\"name\":\"sign\",\"type\":\"bytes32[4]\"}],\"name\":\"getAssetList\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"assetAddress\",\"type\":\"address\"},{\"name\":\"sign\",\"type\":\"bytes32[4]\"}],\"name\":\"addAsset\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sign\",\"type\":\"bytes32[4]\"}],\"name\":\"unfreezePool\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"assetAddress\",\"type\":\"address\"},{\"name\":\"sign\",\"type\":\"bytes32[4]\"}],\"name\":\"removeAsset\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sign\",\"type\":\"bytes32[4]\"}],\"name\":\"freezePool\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"assetAddress\",\"type\":\"address\"},{\"name\":\"toStatus\",\"type\":\"uint8\"},{\"name\":\"sign\",\"type\":\"bytes32[4]\"}],\"name\":\"moveAsset\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"status\",\"type\":\"uint8\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"desc\",\"type\":\"string\"},{\"name\":\"sign\",\"type\":\"bytes32[4]\"}],\"name\":\"addStatus\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"authCenterAddr\",\"type\":\"address\"},{\"name\":\"orgAddr\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"fromStatus\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"toStatus\",\"type\":\"uint8\"}],\"name\":\"AssetStatusTransform\",\"type\":\"event\"}]"};

    public static final String ABI = String.join("", ABI_ARRAY);

    public static final String FUNC_GETASSETLIST = "getAssetList";

    public static final String FUNC_STATUS = "status";

    public static final String FUNC_ADDASSET = "addAsset";

    public static final String FUNC_UNFREEZEPOOL = "unfreezePool";

    public static final String FUNC_REMOVEASSET = "removeAsset";

    public static final String FUNC_FREEZEPOOL = "freezePool";

    public static final String FUNC_MOVEASSET = "moveAsset";

    public static final String FUNC_ADDSTATUS = "addStatus";

    public static final Event ASSETSTATUSTRANSFORM_EVENT = new Event("AssetStatusTransform", 
            Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Uint8>() {}, new TypeReference<Uint8>() {}));
    ;

    protected AssetPool(String contractAddress, Client client, CryptoKeyPair credential) {
        super(getBinary(client.getCryptoSuite()), contractAddress, client, credential);
    }

    public static String getBinary(CryptoSuite cryptoSuite) {
        return (cryptoSuite.getCryptoTypeConfig() == CryptoType.ECDSA_TYPE ? BINARY : SM_BINARY);
    }

    public List getAssetList(List<byte[]> sign) throws ContractException {
        final Function function = new Function(FUNC_GETASSETLIST, 
                Arrays.<Type>asList(new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Address>>() {}));
        List<Type> result = (List<Type>) executeCallWithSingleValueReturn(function, List.class);
        return convertToNative(result);
    }

    public BigInteger status() throws ContractException {
        final Function function = new Function(FUNC_STATUS, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint8>() {}));
        return executeCallWithSingleValueReturn(function, BigInteger.class);
    }

    public TransactionReceipt addAsset(String assetAddress, List<byte[]> sign) {
        final Function function = new Function(
                FUNC_ADDASSET, 
                Arrays.<Type>asList(new Address(assetAddress),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return executeTransaction(function);
    }

    public void addAsset(String assetAddress, List<byte[]> sign, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_ADDASSET, 
                Arrays.<Type>asList(new Address(assetAddress),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForAddAsset(String assetAddress, List<byte[]> sign) {
        final Function function = new Function(
                FUNC_ADDASSET, 
                Arrays.<Type>asList(new Address(assetAddress),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return createSignedTransaction(function);
    }

    public Tuple2<String, List<byte[]>> getAddAssetInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_ADDASSET, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<StaticArray4<Bytes32>>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple2<String, List<byte[]>>(

                (String) results.get(0).getValue(), 
                convertToNative((List<Bytes32>) results.get(1).getValue())
                );
    }

    public Tuple1<List<String>> getAddAssetOutput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getOutput();
        final Function function = new Function(FUNC_ADDASSET, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Address>>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<List<String>>(

                convertToNative((List<Address>) results.get(0).getValue())
                );
    }

    public TransactionReceipt unfreezePool(List<byte[]> sign) {
        final Function function = new Function(
                FUNC_UNFREEZEPOOL, 
                Arrays.<Type>asList(new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return executeTransaction(function);
    }

    public void unfreezePool(List<byte[]> sign, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_UNFREEZEPOOL, 
                Arrays.<Type>asList(new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForUnfreezePool(List<byte[]> sign) {
        final Function function = new Function(
                FUNC_UNFREEZEPOOL, 
                Arrays.<Type>asList(new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return createSignedTransaction(function);
    }

    public Tuple1<List<byte[]>> getUnfreezePoolInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_UNFREEZEPOOL, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<StaticArray4<Bytes32>>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<List<byte[]>>(

                convertToNative((List<Bytes32>) results.get(0).getValue())
                );
    }

    public Tuple1<BigInteger> getUnfreezePoolOutput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getOutput();
        final Function function = new Function(FUNC_UNFREEZEPOOL, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint8>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<BigInteger>(

                (BigInteger) results.get(0).getValue()
                );
    }

    public TransactionReceipt removeAsset(String assetAddress, List<byte[]> sign) {
        final Function function = new Function(
                FUNC_REMOVEASSET, 
                Arrays.<Type>asList(new Address(assetAddress),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return executeTransaction(function);
    }

    public void removeAsset(String assetAddress, List<byte[]> sign, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_REMOVEASSET, 
                Arrays.<Type>asList(new Address(assetAddress),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForRemoveAsset(String assetAddress, List<byte[]> sign) {
        final Function function = new Function(
                FUNC_REMOVEASSET, 
                Arrays.<Type>asList(new Address(assetAddress),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return createSignedTransaction(function);
    }

    public Tuple2<String, List<byte[]>> getRemoveAssetInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_REMOVEASSET, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<StaticArray4<Bytes32>>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple2<String, List<byte[]>>(

                (String) results.get(0).getValue(), 
                convertToNative((List<Bytes32>) results.get(1).getValue())
                );
    }

    public Tuple1<List<String>> getRemoveAssetOutput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getOutput();
        final Function function = new Function(FUNC_REMOVEASSET, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<DynamicArray<Address>>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<List<String>>(

                convertToNative((List<Address>) results.get(0).getValue())
                );
    }

    public TransactionReceipt freezePool(List<byte[]> sign) {
        final Function function = new Function(
                FUNC_FREEZEPOOL, 
                Arrays.<Type>asList(new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return executeTransaction(function);
    }

    public void freezePool(List<byte[]> sign, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_FREEZEPOOL, 
                Arrays.<Type>asList(new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForFreezePool(List<byte[]> sign) {
        final Function function = new Function(
                FUNC_FREEZEPOOL, 
                Arrays.<Type>asList(new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return createSignedTransaction(function);
    }

    public Tuple1<List<byte[]>> getFreezePoolInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_FREEZEPOOL, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<StaticArray4<Bytes32>>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<List<byte[]>>(

                convertToNative((List<Bytes32>) results.get(0).getValue())
                );
    }

    public Tuple1<BigInteger> getFreezePoolOutput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getOutput();
        final Function function = new Function(FUNC_FREEZEPOOL, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint8>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<BigInteger>(

                (BigInteger) results.get(0).getValue()
                );
    }

    public TransactionReceipt moveAsset(String assetAddress, BigInteger toStatus, List<byte[]> sign) {
        final Function function = new Function(
                FUNC_MOVEASSET, 
                Arrays.<Type>asList(new Address(assetAddress),
                new Uint8(toStatus),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return executeTransaction(function);
    }

    public void moveAsset(String assetAddress, BigInteger toStatus, List<byte[]> sign, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_MOVEASSET, 
                Arrays.<Type>asList(new Address(assetAddress),
                new Uint8(toStatus),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForMoveAsset(String assetAddress, BigInteger toStatus, List<byte[]> sign) {
        final Function function = new Function(
                FUNC_MOVEASSET, 
                Arrays.<Type>asList(new Address(assetAddress),
                new Uint8(toStatus),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return createSignedTransaction(function);
    }

    public Tuple3<String, BigInteger, List<byte[]>> getMoveAssetInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_MOVEASSET, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Uint8>() {}, new TypeReference<StaticArray4<Bytes32>>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple3<String, BigInteger, List<byte[]>>(

                (String) results.get(0).getValue(), 
                (BigInteger) results.get(1).getValue(), 
                convertToNative((List<Bytes32>) results.get(2).getValue())
                );
    }

    public Tuple1<BigInteger> getMoveAssetOutput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getOutput();
        final Function function = new Function(FUNC_MOVEASSET, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint8>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<BigInteger>(

                (BigInteger) results.get(0).getValue()
                );
    }

    public TransactionReceipt addStatus(BigInteger status, String name, String desc, List<byte[]> sign) {
        final Function function = new Function(
                FUNC_ADDSTATUS, 
                Arrays.<Type>asList(new Uint8(status),
                new Utf8String(name),
                new Utf8String(desc),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return executeTransaction(function);
    }

    public void addStatus(BigInteger status, String name, String desc, List<byte[]> sign, TransactionCallback callback) {
        final Function function = new Function(
                FUNC_ADDSTATUS, 
                Arrays.<Type>asList(new Uint8(status),
                new Utf8String(name),
                new Utf8String(desc),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        asyncExecuteTransaction(function, callback);
    }

    public String getSignedTransactionForAddStatus(BigInteger status, String name, String desc, List<byte[]> sign) {
        final Function function = new Function(
                FUNC_ADDSTATUS, 
                Arrays.<Type>asList(new Uint8(status),
                new Utf8String(name),
                new Utf8String(desc),
                new StaticArray4<Bytes32>(
                        org.fisco.bcos.sdk.abi.Utils.typeMap(sign, Bytes32.class))),
                Collections.<TypeReference<?>>emptyList());
        return createSignedTransaction(function);
    }

    public Tuple4<BigInteger, String, String, List<byte[]>> getAddStatusInput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getInput().substring(10);
        final Function function = new Function(FUNC_ADDSTATUS, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint8>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<StaticArray4<Bytes32>>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple4<BigInteger, String, String, List<byte[]>>(

                (BigInteger) results.get(0).getValue(), 
                (String) results.get(1).getValue(), 
                (String) results.get(2).getValue(), 
                convertToNative((List<Bytes32>) results.get(3).getValue())
                );
    }

    public Tuple1<BigInteger> getAddStatusOutput(TransactionReceipt transactionReceipt) {
        String data = transactionReceipt.getOutput();
        final Function function = new Function(FUNC_ADDSTATUS, 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
        List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
        return new Tuple1<BigInteger>(

                (BigInteger) results.get(0).getValue()
                );
    }

    public List<AssetStatusTransformEventResponse> getAssetStatusTransformEvents(TransactionReceipt transactionReceipt) {
        List<EventValuesWithLog> valueList = extractEventParametersWithLog(ASSETSTATUSTRANSFORM_EVENT, transactionReceipt);
        ArrayList<AssetStatusTransformEventResponse> responses = new ArrayList<AssetStatusTransformEventResponse>(valueList.size());
        for (EventValuesWithLog eventValues : valueList) {
            AssetStatusTransformEventResponse typedResponse = new AssetStatusTransformEventResponse();
            typedResponse.log = eventValues.getLog();
            typedResponse._asset = (String) eventValues.getNonIndexedValues().get(0).getValue();
            typedResponse.fromStatus = (BigInteger) eventValues.getNonIndexedValues().get(1).getValue();
            typedResponse.toStatus = (BigInteger) eventValues.getNonIndexedValues().get(2).getValue();
            responses.add(typedResponse);
        }
        return responses;
    }

    public void subscribeAssetStatusTransformEvent(String fromBlock, String toBlock, List<String> otherTopics, EventCallback callback) {
        String topic0 = eventEncoder.encode(ASSETSTATUSTRANSFORM_EVENT);
        subscribeEvent(ABI,BINARY,topic0,fromBlock,toBlock,otherTopics,callback);
    }

    public void subscribeAssetStatusTransformEvent(EventCallback callback) {
        String topic0 = eventEncoder.encode(ASSETSTATUSTRANSFORM_EVENT);
        subscribeEvent(ABI,BINARY,topic0,callback);
    }

    public static AssetPool load(String contractAddress, Client client, CryptoKeyPair credential) {
        return new AssetPool(contractAddress, client, credential);
    }

    public static AssetPool deploy(Client client, CryptoKeyPair credential, String authCenterAddr, String orgAddr) throws ContractException {
        String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new Address(authCenterAddr),
                new Address(orgAddr)));
        return deploy(AssetPool.class, client, credential, getBinary(client.getCryptoSuite()), encodedConstructor);
    }

    public static class AssetStatusTransformEventResponse {
        public TransactionReceipt.Logs log;

        public String _asset;

        public BigInteger fromStatus;

        public BigInteger toStatus;
    }
}
